/**
 * project2
 *
 * brief description of the program
 *
 * This program is released to public domain according to
 * author's wish, you can view full license at
 * http://tomatoeskit.org/upload/PublicDomainLicense.txt
 *
 * @author Fangning CHENG (Alpha.L Cheng) <chengf@purdue.edu>
 *
 * @lab section number 
 *
 * @date Sep 16, 2013
 *
 */

public class Point {
 
    /**
     * The x and y coordinates of this Point.
     */
    private final double x; //Hell
    private final double y; //Hell
 
    /**
     * Construct a Point having the given parameters as x and y coordinates.
     * 
     * @param x the X coordinate of this Point.
     * @param y the Y coordinate of this Point.
     */
    public Point(double x, double y) {
        this.x = x; this.y = y;
    }
 
 
    /**
     * @return the double value of this Point's 
     *         X coordinate.
     */
    public double getX() {
        return x;
    }
 
 
    /**
     * @return the double value of this Point's
     *         Y Coordinate.
     */
    public double getY() {
        return y;
    }
 
 
    /**
     * @return the String:
     * "(X, Y)"
     * where X is the value of this Point's X coordinate formatted to two decimal points of precision.
     * and Y is the value of this Point's Y coordinate formatted to two decimal points of precision. 
     */
    @Override
    public String toString() {
        return String.format("(%.2f, %.2f)", x, y); 
    }
}
